import request from '@/utils/request'

/**
 * @description: 登录
 * @param {*} data {modile, password}
 * @return {*}
 */
export function userProfile() {
  return request({
    url: 'api/sys/profile',
    method: 'post'

  })
}
// 获取id
export function getUserDetailById(id) {
  return request({
    url: 'api/sys/user/' + id,
    method: 'get'

  })
}

export function login(data) {
  return request({
    url: 'api/sys/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}

